package cn04;

//标准类

public class car {
    //定义成员变量
    private  String brand;
    private  int price;
    //定义无参构造方法
    public car(){

    }
    //定义全参构造方法
    public car(String brand,int price){
        this.brand = brand;
        this.price = price;
    }
    //定义成员方法  存set  取get
    public void setBrand(String brand){
        this.brand  = brand;
    }
    public  void setPrice(int price){
        this.price = price;
    }
    public String getBrand(){
        return brand;
    }
    public int getPrice(){
        return price;
    }
}
